::selection {
    background: #444;
    color: #fff;
}
html, body {
    max-width: 100%;
    height: 100%;
    padding: 0;
    margin: 0 auto;
    overscroll-behavior: none;
}

body.self{
    height: auto;
}

body.self .container {
    max-width: 800px;
    margin-top: 5%;
    height: 500px;
    background: #fefefe;
    padding: 20px 30px;
    border-radius: 22px;
}

#lowpoly {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: -1;
}

.container {
    top: 0;
    width: 100%;
    height: 100%;
    margin: 0 auto;
    padding: 2px;
    box-sizing: border-box;
    display: block;
    position: relative;
}

.toast {
    display: none;
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,.5);
    color: #fff;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 20px;
    animation: toast .3s ease-in-out;
}

@keyframes toast{
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%);
    }
}

.status-box {
    display: inline-block;
    float: right;
    font-size: 12px;
    color: #666;
}

.status-box:hover #userList {
    display: block;
}

#userList {
    display: none;
    position: absolute;
    left: 0;
    width: 100%;
    color: brown;
    background: #e0e0e0;
    padding: 10px 14px;
    font-size: 14px;
    box-sizing: border-box;
    word-break: break-all;
    text-align: left;
}

#userList .nickname {
    cursor: pointer;
}

#userList .nickname.cur {
    color: #dc143c;
}

#msgList {
    border: 1px solid #ccc;
    width: 100%;
    height: calc(100% - 60px);
    overflow-y: auto;
    font-size: 12px;
    padding: 0 4px;
    padding-bottom: 2px;
    box-sizing: border-box;
    overscroll-behavior: none;
}

.send-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 4px;
    text-align: center;
}

.send-box input {
    display: inline-block;
    font-size: 14px;
    margin-bottom: 0;
}

.send-box input.error {
    border: 1px solid red;
}

input[name="name"] {
    width: 15%;
    min-width: 80px;
}

.input-wrap{
    position: relative;
    width: 60%;
    height: 40px;
    margin: 0;
    margin-right: 6px;
}

input[name="msg"],
textarea[name="msg"] {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    max-height: 120px;
    font-size: 14px;
    resize: none;
    margin: 0;
}

input[type="button"] {
    width: 20%;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
}

.color {
    display: inline-block;
    min-width: 20px;
    width: 5%;
    margin-right: 6px;
    overflow: hidden;
}

input[type="color"] {
    display: block;
    width: 100%;
    height: 14px;
    padding: 0px;
    margin: 2px 0;
    border-radius: 0;
    box-sizing: border-box;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    border-radius: 0;
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border-radius: 0;
    border: 0;
}

#messageInput {
    height: 80px;
}

.message {
    padding: 0 5px;
    line-height: 1.6;
    word-break: break-all;
}

.message.highlight {
    display: inline-block;
    border: 1px solid #ff4747;
    margin: 1px 0;
}

.message .nickname {
    padding-right: 5px;
    color: brown;
    font-family: Consolas, Monaco, monospace;
    font-size: 12px;
    cursor: pointer;
}

.message .name {
    color: #117743;
    font-weight: bold;
}

.message .uid {
    color: #cc1105;
    font-weight: bold;
}

.message .time {
    color: #6f6f6f;
}

.message .msg {
    font-size: 14px;
}

.sys-msg {
    color: #c1bfbf;
    padding-right: 5px;
    padding-left: 5px;
    font-size: 14px;
}

#users {
    width: 490px;
    padding: 0 5px 5px;
}

@media screen and (max-device-width: 480px) {
    body {
        -webkit-text-size-adjust: none;
    }
}